from sqlalchemy import Column, Integer, ForeignKey, Table
from app.db.session import Base

# 创建文章与标签的关联表
article_tag = Table(
    "article_tags",
    Base.metadata,
    Column("article_id", Integer, ForeignKey("articles.id", ondelete="CASCADE"), primary_key=True),
    Column("tag_id", Integer, ForeignKey("tags.id", ondelete="CASCADE"), primary_key=True)
) 